﻿@{
	string h1Value = PageTitle.Count > 0 ? PageTitle.Last().Text : null;
	string headText = Html.Head(PageTitle).ToString();
	if (!String.IsNullOrEmpty(headText))
	{
		headText += " / ";
	}
}
<!DOCTYPE html>
<html>
<head>
	<title>
		@headText.AsHtml()Шаблон WebMP
	</title>
	@Html.Partial("Head")
	@RenderSection("head", false)
</head>
<body>
	<div id="All">
		<header>
			<div><a href="/" title="Перейти на главную">Mindfor WebMP Template</a></div>
			<nav id="MainMenu">
				@Html.ActionModule("MainMenu", "Menu", "System")
			</nav>
		</header>

		<section id="Left">
			@Html.Widgets("Left")
		</section>

		@if (IsSectionDefined("replaceMain"))
		{
			@RenderSection("replaceMain");
		}
		else
		{
			<section id="Main">
				@if (IsSectionDefined("title"))
				{
					@RenderSection("title")
				}
				else if (!String.IsNullOrEmpty(h1Value))
				{
					<h1>@h1Value.AsHtml()</h1>
					@Html.Partial("Path", PageTitle)
				}
				@RenderBody()
			</section>
		}
		<div id="PreFooter"></div>
	</div>
	@Html.Partial("Footer")
</body>
</html>